package storage.sql;

/**
 * The SimpleDB version of the java.sql.Connection interface.
 * This interface implements a subset of the methods in that
 * interface. 
 * @author Edward Sciore
 */
public interface Connection {
	
	/**
	 * Commits the current transaction and begins a new one.
	 * @throws SQLException
	 */
	public void commit()               throws SQLException;
	
	/**
	 * Rolls back the current transaction and begins a new one.
	 * @throws SQLException
	 */
	public void rollback()             throws SQLException;
	
	/**
	 * Commits the current transaction and closes the connection.
	 * @throws SQLException
	 */
	public void close()                throws SQLException;
	
	/**
	 * Creates a Statement object for use in executing
	 * SQL statements.
	 * @return the newly-created Statement object
	 * @throws SQLException
	 */
	public Statement createStatement() throws SQLException;
}

